import Vue from 'vue'
import App from './App'
import store from './store'
import Cache from './utils/cache'
import util from 'utils/util'
import configs from './config/app.js'
import Auth from './libs/wechat';

// 引入全局uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView);
// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')

// import UniSection from '@/components/uni/uni-swipe-action/uni-swipe-action.vue';
// Vue.use(UniSection);
// // Vue.component('uni-section', UniSection);

Vue.mixin(mpShare)
// #endif

Vue.prototype.$util = util;
Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$store = store;
Vue.prototype.$wechat = Auth;

import './assets/style/border.css'
import './assets/style/main.css'
import http from './common/axios.js'  
import json from './json2' //测试用数据

Vue.config.productionTip = false

App.mpType = 'app' 
//统一提示方便全局修改
const msg = (title,  icon='none',duration=2000, mask=false)=>{
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
} 
Vue.prototype.$api = {msg, json, http};  

const app = new Vue({
    ...App
})
app.$mount()
